package controllers;

import java.awt.event.ActionEvent;

import system.View;

public class CustomerMenuController extends AbstractMenuController {

    CustomerPurchaseController customer_purchase;
    CustomerLoginController customer_login;
    CustomerRegistrationController customer_registration;
    CustomerSearchController customer_search;
    
    public CustomerMenuController(View v) {
        super(v);
        customer_purchase = new CustomerPurchaseController(v);
        customer_login = new CustomerLoginController(v);
        customer_registration = new CustomerRegistrationController(v);
        customer_search = new CustomerSearchController(v);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        String actionCommand = e.getActionCommand();

        if (actionCommand.equals("Purchase"))
            customer_purchase.actionPerformed(e);
        else if (actionCommand.equals("Login"))
        	customer_login.actionPerformed(e);
        else if (actionCommand.equals("Register"))
        	customer_registration.actionPerformed(e);
        else if (actionCommand.equals("Search"))
        	customer_search.actionPerformed(e);
    }

    @Override
    public void show() {
        // TODO Auto-generated method stub

    }
}

